package com.isoft.c2team3service2.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.isoft.c2team3service2.entity.Person;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PersonMapper extends BaseMapper<Person> {
    //插入会员信息
    @Insert("INSERT INTO tb_person (username, birthdate, phonenumber,nick_name,email ,login_id ) " +
            "VALUES (#{username},#{birthdate},#{phonenumber},#{nick_name},#{email} ,#{login_id})")
    int insertPerson(String username,String birthdate,
                     String phonenumber , String nick_name,
                     String email ,Integer login_id);



    //根据会员邮箱查询会员信息
    @Select("select username,birthdate,phonenumber,nick_name,email from tb_person where email=#{email}")
    Person updatePerson(String email);

}
